from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
#
client = OpenAI()

thread = client.beta.threads.create(
    messages=[
        {
            "role": "user",

            "content": "计算2022年到2025年每个季度的宗销售额，并通过不同的产品将其可视化成折线图，产品线条的颜色分别是红，蓝，绿",

            "attachments": [

                {

                    "file_id": "file-bblx99gKnQodPHNgCIewtoOV",
                    "tools": [
                        {
                            "type": "code_interpreter"
                        }
                    ]
                }
            ]

        }

    ]

)



print(thread)  #   thread_id : thread_u1SgyJ3jJo7KVOsOsiWe3lSH


